home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 9
/
009.d81
/
spelling drill
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
206 lines
1 rem *** spelling drill ***
2 rem *** an original program by ***
3 rem *** donna k. woody ***
10 poke53272,23:printchr$(8)
15 dimw$(25),s1$(25),s2$(25),s3$(25),an$(25),d(25):s=65520
20 poke53280,5:poke53281,1:printchr$(31)
25 poke783,peek(783)and254:printchr$(14):printchr$(8)
30 goto180
40 poke783,peek(783)and254:poke781,6:poke782,0:syss
50 forx=1to640:print" ";:next:return
177 :
178 rem *** title page ***
179 :
180 printchr$(147)
185 poke783,peek(783)and254
190 poke781,5:poke782,13:syss:print"[211][208][197][204][204][201][206][199] [196][210][201][204][204]"
200 poke781,8:poke782,19:syss:print"by"
205 poke781,11:poke782,13:syss:print"[196]onna [203]. [215]oody"
210 poke781,23:poke782,3:syss:print"[215]ould you like instructions (y/n)?[160]";:
220 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then220
230 ifa$="y"ora$="[217]"thengosub5000:rem * instructions *
240 printchr$(147)
242 gosub11000:rem * choose file *
244 gosub10000:ifcz=62then242
245 poke781,10:poke782,0:syss:print"[208]lease wait......."
247 print:print"[204]oading file......."
248 open15,8,15
250 open4,8,4,"0:"+fi$+",seq,read"
270 input#4,nu
280 fori=1tonu
290 input#4,w$(i),s1$(i),s2$(i),s3$(i),an$(i)
300 nexti
302 close4:close15
303 gosub11100
304 gosub11200
306 ifflag=1thenflag=0:goto11300
311 r=o:i=0
312 fori=1tonu
314 printchr$(147):printtab(12)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
315 printchr$(19):poke781,2:poke782,28:syss:printr"/"i-1
320 forz=1to40:print"=";:next
332 poke781,4:poke782,13:syss:print"definition #"i:print
334 printw$(d(i)):print
340 print" [193]. "s1$(d(i)):print
350 print" [194].[160]"s2$(d(i)):print
360 print" [195]. "s3$(d(i)):print
370 poke781,15:poke782,0:syss:print" -->[160]";
380 poke198,0:wait198,1:geta$
385 ifa$<>"a"anda$<>"b"anda$<>"c"anda$<>"[193]"anda$<>"[194]"anda$<>"[195]"then370
386 printa$
387 ifa$="[193]"thena$="a"
388 ifa$="[194]"thena$="b"
389 ifa$="[195]"thena$="c"
430 printchr$(144)
432 ifa$=an$(d(i))thenwr$="[210][201][199][200][212]!!!"
434 ifa$<>an$(d(i))thenwr$="[215][210][207][206][199]!"
436 poke781,18:poke782,10:syss:print" [157][157][157][157][157][157][157][157][157][157]"wr$
440 ifa$=an$(d(i))then485
480 poke781,20:poke782,0:syss:print"[195]orrect answer is "an$(d(i))
485 ifa$=an$(d(i))thenr=r+1
490 ifa$<>an$(d(i))thenprint""
492 printchr$(31)
500 poke781,23:poke782,1:syss:print"[208]ress [211][208][193][195][197] [194][193][210] to continue.";:
510 poke198,0:wait198,1:geta$:ifa$<>" "then510
520 poke781,18:poke782,10:syss:print" "
530 nexti
600 printchr$(147):printtab(13)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
605 pc=int((r/nu)*100)
610 ifpc>=90thenprintchr$(144)
620 poke781,3:poke782,0:syss:print"90% - 100% -- [197]xcellent! ":printchr$(31)
630 ifpc>=70andpc<90thenprintchr$(144)
640 poke781,5:poke782,0:syss:print"70% - 80% -- [214]ery good!":printchr$(31)
650 ifpc>=60andpc<70thenprintchr$(144)
660 poke781,7:poke782,0:syss:print"60% - 70% -- [198]air":printchr$(31)
680 ifpc>=50andpc<60thenprintchr$(144)
690 poke781,9:poke782,0:syss:print"50% - 60% -- [206]ot too good"
700 printchr$(31)
710 ifpc<50thenprintchr$(144)
720 poke781,11:poke782,0:syss:print" 0% - 50% -- [215]e know you didn't cheat"
730 printchr$(31)
810 poke781,20:poke782,0:syss:print"[208]ress <[210]> to repeat the test."
820 print"[208]ress <[204]> to go back to [204][207][193][196][211][212][193][210].":print"[208]ress <[193]> for another test."
830 poke198,0:wait198,1:geta$:ifa$<>"r"anda$<>"l"anda$<>"a"then830
835 ifa$<>"r"anda$<>"l"anda$<>"a"anda$<>"[210]"anda$<>"[204]"anda$<>"[193]"then810
840 ifa$="r"ora$="[210]"thenprintchr$(147):goto311
845 ifa$="a"ora$="[193]"thenprintchr$(147):goto240
850 ifa$="l"ora$="[204]"thenprintchr$(147):goto63000
4999 :
5000 rem *** instructions ***
5001 :
5010 fori=1to2
5015 printchr$(147)
5020 forj=1to10
5030 reada$:printa$:print
5040 nextj
5050 poke781,23:poke782,6:syss:print"press space bar to continue";
5060 poke198,0:wait198,1:geta$:ifa$<>" "then5060
5070 nexti
5080 return
6000 data" [215]elcome to [211][208][197][204][204][201][206][199][160][196][210][201][204][204]! [206]ot only"
6005 data"will you learn how to spell, but you'll"
6007 data"also increase your vocabulary!"
6010 data" [200]ere are some of the words that seem"
6012 data"to give everyone a lot of trouble. [215]e"
6015 data"are also going to include some words"
6020 data"you may not have heard of before, just"
6022 data"to keep things interesting!"
6025 data" [217]ou will be given a definition of a"
6030 data"word and three possible spellings."
6031 data"[195]hoose the spelling you think (or know)"
6032 data"is right. [193]nswers are entered with a"
6033 data"single keystroke. [217]ou do not need to"
6034 data"press the <[210][197][212][213][210][206]> key."
6046 data" [217]our score is shown in the upper"
6047 data"right-hand corner. [193]fter the test is"
6048 data"over, you will be given a score based"
6049 data"on the number of questions you answered"
6050 data"correctly."
6052 data" [200]ave fun and good luck!"
9997 :
9998 rem *** check for file ***
9999 :
10000 open15,8,15
10005 open4,8,4,"0:"+fi$+",seq,read":close4
10010 print#15,cz,mz$,sz,tz:close15
10020 ifcz=0thenreturn
10030 ifcz=62thenprintchr$(147):print"[212]hat file does not exist on this disk."
10040 print:print:print"[196]o you want to continue (y/n)?[160]";:poke198,0:wait198,1:ge
10050 ifa$="y"ora$="[217]"thenprintchr$(147):return
10060 ifa$="n"ora$="n"thenprintchr$(147):end
10070 print"[145][145][145][145]":goto10040
10997 :
10998 rem *** choose file ***
10999 :
11000 printchr$(147):print:printtab(13)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]":print:print:print
11002 pc=0:r=0
11005 print:print" 0. [197]xit program"
11010 print:print" 1. [211]pelling [215]ords #1"
11020 print:print" 2. [211]pelling [215]ords #2"
11040 print:print:print" [197]nter selection (0 - 2) ";:poke198,0:wait198,1:geta$
11050 ifa$="0"then 63000
11060 ifa$="1"then fi$="words.1":printchr$(147):goto11095
11070 ifa$="2"then fi$="words.2":printchr$(147):goto11095
11090 poke781,12:poke782,0:syss:goto11040
11095 return
11100 forx=1tonu:d(x)=x:next
11110 fori=1tonu:d%=(rnd(1)*nu)+1:dt=d(i):d(i)=d(d%):d(d%)=dt:next
11120 return
11197 :
11198 rem *** print? ***
11199 :
11200 printchr$(147)
11210 poke781,5:poke782,0:syss
11215 print"[196]o you want [211][208][197][204][204][201][206][199] [196][210][201][204][204] printed out (y/n)?[160]";:
11220 poke198,0:wait198,1:geta$
11230 ifa$="[217]"ora$="y"thenflag=1:goto11260
11240 ifa$="[206]"ora$="n"thenflag=0:goto11260
11250 poke781,22:poke782,1:syss:print"[208]lease answer 'y' or 'n'.":goto11210
11260 return
11297 :
11298 rem *** print drill ***
11299 :
11300 printchr$(147)
11310 print"[205]ake sure your printer is correctly hooked up to your computer."
11320 print:print
11330 print"[204]ine up the paper at the top of the page."
11340 print:print
11350 print"[212]urn on your printer."
11360 print:print
11370 print"[208]ress <f1> function key when you are ready to print."
11380 poke198,0:wait198,1:geta$
11390 ifasc(a$)<>133then11380
11400 open4,4,7:cmd4
11410 print"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
11420 print:print"[206][193][205][197]: [196][193][212][197]:":print:print
11425 c1=6:p=2
11430 fori=1tonu
11435 print"[209]uestion #"i
11440 printw$(d(i))
11450 print" [193]. "s1$(d(i))
11460 print" [194].[160]"s2$(d(i))
11470 print" [195]. "s3$(d(i))
11480 print"[193]nswer is -->[160]"
11485 c1=c1+7:ifc1>=62thenc1=3:print:print:print:print:print"[208]age "p:p=p+1
11490 print:next
11495 print#4
11500 close4
11505 printchr$(147)
11510 print"[204]ine up the paper at the top of the page for the answers."
11520 print:print
11530 print"[212]urn on your printer."
11540 print:print
11550 print"[208]ress <f1> function key when you are ready to print."
11560 poke198,0:wait198,1:geta$
11570 ifasc(a$)<>133then11560
11575 open4,4,7:cmd4
11580 print